package com.tee.live.im.router.provider.service.impl;

import com.tee.live.im.core.server.interfaces.rpc.IRouterHandlerRpc;
import com.tee.live.im.router.provider.service.ImRouterService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author tee
 * @date 2025/11/8
 */
public class ImRouterServiceImpl implements ImRouterService {

    @DubboReference
    private IRouterHandlerRpc routerHandlerRpc;

    @Override
    public boolean sendMsg(Long userId, String msgJson) {
        String objectImServerIp = "192.168.10.139:9099";
        RpcContext.getContext().set("ip", objectImServerIp);
        routerHandlerRpc.sendMsg(userId,msgJson);
        return true;
    }
}
